#include <iostream>
#include <string>
/*租房抽象类*/
class RentHouse {
public:
    virtual void rent_house() = 0;    
};
/*房东类*/
class Landlord : public RentHouse {
public:
    virtual void rent_house() override {
        std::cout << "租房\n";
    }
};
/*代理类，隔开租客和房东*/
class InterMediary : public RentHouse {
public:
    virtual void rent_house() override {
        std::cout << "发布招租广告\n";
        std::cout << "带人看房\n";
        landlord_.rent_house();
        std::cout << "负责租后维修\n";
    }
private:
    Landlord landlord_;
};

int main() {
    InterMediary intermediary;
    intermediary.rent_house();
    return 0;
}
